home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- /**
- @Tool: insert SpotLight~inserts the SpotLight node. The SpotLight node defines
- a light source that emits light from a specific point along a specific
- direction vector and constrained within a solid angle.
- @EndTool:
- @Summary: insert SpotLight~inserts the SpotLight node
- */
-
- var Node =
- "SpotLight {" +
- "\n\tambientIntensity 0 # exposedField SFFloat" +
- "\n\tattenuation 1 0 0 # exposedField SFVec3f" +
- "\n\tbeamWidth 1.570796 # exposedField SFFloat" +
- "\n\tcolor 1 1 1 # exposedField SFColor" +
- "\n\tcutOffAngle 0.785398 # exposedField SFFloat" +
- "\n\tdirection 0 0 -1 # exposedField SFVec3f" +
- "\n\tintensity 1 # exposedField SFFloat" +
- "\n\tlocation 0 0 0 # exposedField SFVec3f" +
- "\n\ton TRUE # exposedField SFBool" +
- "\n\tradius 100 # exposedField SFFloat" +
- "\n}" +
- "\n@Caret";
-
- function DoCommand()
- {
- var textUtilities = getScriptObject("Library\\textUtilities.script");
- if (textUtilities)
- {
- var editor = getActiveEditor();
- if (editor)
- {
- var lineIndex = textUtilities.InsertString(editor, Node);
-
- // Now replace @Caret with the real caret
- var range = editor.findFirst("@Caret", lineIndex, 0);
- editor.replace("", range);
- editor.setActive("Insert SpotLight Node");
- }
- }
- }
-
- !!/Script
-
-